package arithmetic;

import java.util.Scanner;
//最大公约数和最小公倍数（a*b/c)
public class Arithmetic8 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = fun(a,b);
        System.out.println("最大公约数是："+c+",最小公倍数为："+a*b/c);

    }
    public static int  fun(int a ,int b){
        int c = a%b;
        if (c==0){
            return b;
        }else {
           return fun(b,c);
        }

    }

}
